home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CICA Windows Explosion!
/
The CICA Windows Explosion! - Disc 2.iso
/
demo
/
gcp_24.exe
/
DIALUPDL.FR_
/
DIALUPDL.FR
Wrap
Text File
|
1994-04-26
|
5KB
|
151 lines
VERSION 2.00
Begin Form DialUpDlg
BorderStyle = 3 'Fixed Double
Caption = "Dial-Up Host"
ClientHeight = 2010
ClientLeft = 2355
ClientTop = 2325
ClientWidth = 5055
Height = 2415
Left = 2295
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2010
ScaleWidth = 5055
Top = 1980
Width = 5175
Begin CommandButton Command4
Caption = "Terminal Settings..."
Height = 375
Left = 2520
TabIndex = 7
Top = 1380
Width = 1995
End
Begin CommandButton Command3
Cancel = -1 'True
Caption = "Cancel"
Height = 375
Left = 3600
TabIndex = 6
Top = 840
Width = 1095
End
Begin CommandButton Command2
Caption = "Comm Settings..."
Height = 375
Left = 360
TabIndex = 5
Top = 1380
Width = 1935
End
Begin CommandButton Command1
Caption = "OK"
Default = -1 'True
Height = 375
Left = 3600
TabIndex = 4
Top = 240
Width = 1095
End
Begin TextBox Phone
Height = 375
Left = 720
TabIndex = 3
Top = 840
Width = 2655
End
Begin TextBox Text1
Height = 375
Left = 720
TabIndex = 1
Top = 240
Width = 2655
End
Begin Label Label1
Caption = "Phone"
Height = 255
Left = 120
TabIndex = 2
Top = 960
Width = 615
End
Begin Label Name
Caption = "Name"
Height = 255
Left = 120
TabIndex = 0
Top = 360
Width = 615
End
End
Sub Command1_Click ()
frmMDI.ActiveForm.VT1.Protocol = 0 'none/dialup
DialUpDlg.Hide
Me.Caption = FState(frmMDI.ActiveForm.Tag).Session & " - connecting..."
Tmp$ = Text1
FState(FIndex).LastDialUp = Tmp$
suc = WritePrivateProfileString("Modem", "LastDialUp", Tmp$, IniFile)
Tmp$ = Phone
FState(FIndex).Phone = Tmp$
suc = WritePrivateProfileString("Modem", "Phone", Tmp$, IniFile)
Tmp$ = FState(FIndex).Dial
suc = WritePrivateProfileString("Modem", "Dial", Tmp$, IniFile)
Tmp$ = FState(FIndex).ModemInitString
suc = WritePrivateProfileString("Modem", "ModemInitString", Tmp$, IniFile)
frmMDI.ActiveForm.VT1.OpenComm = True
End Sub
Sub Command2_Click ()
CenterForm frmMDI, ConfigScrn
ConfigScrn.Show 1 'modal
End Sub
Sub Command3_Click ()
frmMDI.ActiveForm.VT1.Protocol = 0
Unload DialUpDlg
End Sub
Sub Command4_Click ()
CenterForm frmMDI, Emulation
Emulation.Show 1 'modal
End Sub
Sub Form_Activate ()
Dim Tmp As String * 80
If FState(frmMDI.ActiveForm.Tag).NewFlag Then
Text1.Text = NewSession.Text1.Text
suc = GetPrivateProfileString("Modem", "Phone", Phone, Tmp, 80, IniFile)
Temp = Left$(Tmp, InStr(Tmp, Chr$(0)) - 1)
Phone.Text = Temp
suc = GetPrivateProfileString("Modem", "Dial", FState(frmMDI.ActiveForm.Tag).Dial, Tmp, 80, IniFile)
Temp = Left$(Tmp, InStr(Tmp, Chr$(0)) - 1)
FState(frmMDI.ActiveForm.Tag).Dial = Temp
suc = GetPrivateProfileString("Modem", "ModemInitString", FState(frmMDI.ActiveForm.Tag).ModemInitString, Tmp, 80, IniFile)
Temp = Left$(Tmp, InStr(Tmp, Chr$(0)) - 1)
FState(frmMDI.ActiveForm.Tag).ModemInitString = Temp
If Temp = "" Then
Phone.Enabled = False
Else
Phone.SetFocus
End If
Else 'otherwise get current values for number and name of last host called
If FState(frmMDI.ActiveForm.Tag).ModemInitString = "" Then
Phone.Enabled = False
Else
Phone.Enabled = True
Phone.Text = FState(frmMDI.ActiveForm.Tag).Phone
Text1.Text = FState(frmMDI.ActiveForm.Tag).LastDialUp
End If
End If
End Sub
Sub Phone_GotFocus ()
Phone.SelStart = 0
Phone.SelLength = Len(Phone.Text)
End Sub